package com.arpa.ntocc.common.mapper;

import com.arpa.ntocc.common.domain.dto.UserLoginSearchDTO;
import com.arpa.ntocc.common.domain.entity.UserLogin;
import com.arpa.ntocc.common.domain.vo.UserLoginVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 登录账号表 Mapper 接口
 * </p>
 *
 * @author LEO
 * @since 2019-08-02
 */
public interface UserLoginMapper extends BaseMapper<UserLogin> {


    /**
     * 查询列表
     * @param searchDTO
     * @return
     */
    List<UserLoginVO> queryList(UserLoginSearchDTO searchDTO);
    /**
     * 查询合计,包含总数
     * @param searchDTO
     * @return
     */
    UserLoginVO queryListSum(UserLoginSearchDTO searchDTO);

    /**
     * 通过账号获取登录信息
     * @param userLoginId
     * @return
     */
    UserLoginVO getByUserLoginId(String userLoginId);

    Map<String, Object> getLoginChooseWarehouseInfo(String authorizeDataCode);

    List<Map<String, Object>> getUserloginWarehouse(@Param("warehouseCodes") List<String> warehouseCodes);

    List<Map<String, Object>> getUserloginShipment(@Param("shipmentCodes") List<String> shipmentCodes);

    Map<String, Object> getLoginChooseShipmentInfo(String authorizeDataCode);

    List<Map<String, Object>> getAllWarehouseForAdmin(String groupCode);

    List<Map<String, Object>> getAllShipmentForAdmin(String groupCode);
}
